\chapter{Fossil命令}

\section{简介}
这个章节将讲述Fossil命令行命令。这部分将会分为多个章节，第一部分将讲述必须知道的命令。这些命令是你一直都需要使用的并且需要记住缩写。其它的命令将会分为维护、高级和杂项。这些命令只需要你在使用它们之前查看参考即可。

最重要的命令是\textbf{help}，你可以在命令行输入\textbf{fossil help}程序将会列表显示所有已有的命令 。然后输入\textbf{fossil help <具体命令> }将会在窗口打印出关于这个命令的详细信息，你会一直可以使用这个作为参考。本书的这个章节将会尝试通过添加一些例子和深入的解释来补充内建的帮助。所有的命令将会建立索引已方便进行搜索查找。

\textbf{注意：} Fossil是一个活动的项目，命令可能会增加也可能会在将来的版本中删除。输入 \textbf{fossil help }以获取你当前版本的最新命令清单。下面的显示的是我写书时的fossil命令你使用的版本可能会有些不一样。


\section{基本命令}
\subsection{help\index{help}}

这个命令来输出当前Fossil版本的所有命令。它还可以使用格式\textbf{fossil help <command> }来获取任何命令的详细信息。

\begin{figure}[H]
\noindent \begin{centering}
\includegraphics{Images/Commands/help1}
\par\end{centering}

\caption{运行Help命令}
\end{figure}

事实上，这个命令只将会列出命令帮助的子集，限于经常使用的命令。如果你想查看所有可用的命令可以使用\textbf{fossil help --all}命令来处理。不同的版本之间你可以看到不同版本所包含的帮助子集的变化。

一个使用\textbf{help}命令来查看特定命令的进一步详细信息的例子如下：

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~add}{\scriptsize \par}

{\scriptsize Usage:~fossil~add~FILE...}{\scriptsize \par}

{\scriptsize Make~arrangements~to~add~one~or~more~files~to~the~current~checkout}{\scriptsize \par}

{\scriptsize at~the~next~commit.}{\scriptsize \par}

{\scriptsize When~adding~files~recursively,~filenames~that~begin~with~\textquotedbl{}.\textquotedbl{}~are}{\scriptsize \par}

{\scriptsize excluded~by~default.~To~include~such~files,~add~the~\textquotedbl{}-{}-dotfiles\textquotedbl{}}{\scriptsize \par}

{\scriptsize option~to~the~command-line.}{\scriptsize \par}
\end{lyxcode}
\caption{具体命令的帮助}


\end{figure}



\subsection{add\index{add}}

增加命令用于将文件加入到仓库里。它是递归的会将所有当前目录下及子文件夹内的文件都推入仓库。Fossil不会覆盖任何已经在仓库里的文件，所以任何时候添加所有文件是安全的。只会将添加新文件。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil}{\scriptsize{}~}\textbf{\scriptsize help~add}{\scriptsize \par}

{\scriptsize Usage:~fossil~add~FILE...}{\scriptsize \par}

{\scriptsize Make~arrangements~to~add~one~or~more~files~to~the~current~checkout}{\scriptsize \par}

{\scriptsize at~the~next~commit.}{\scriptsize \par}

{\scriptsize When~adding~files~recursively,~filenames~that~begin~with~\textquotedbl{}.\textquotedbl{}~are}{\scriptsize \par}

{\scriptsize excluded~by~default.~To~include~such~files,~add~the~\textquotedbl{}-{}-dotfiles\textquotedbl{}}{\scriptsize \par}

{\scriptsize option~to~the~command-line.}{\scriptsize \par}
\end{lyxcode}
\caption{add命令}


\end{figure}


输入：
\begin{lyxcode}
fossil~add~.
\end{lyxcode}
将会添加当前目录及子目录的所有文件。

注意所有这些文件在提交前都不会被推入仓库里。


\subsection{rm\index{rm} or del\index{del}}

命令rm用于从仓库删除文件。但是文件在你下一次提交后从仓库里删除而不会从文件系统里被删除掉。但是文件任然会在之前的版本之中，而之后的版本将不再存在。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~rm}{\scriptsize \par}

{\scriptsize Usage:~fossil~rm~FILE...}{\scriptsize \par}

{\scriptsize{}~~~or:~fossil~del~FILE...}{\scriptsize \par}

{\scriptsize Remove~one~or~more~files~from~the~tree.}{\scriptsize \par}

{\scriptsize This~command~does~not~remove~the~files~from~disk.~~It~just~marks~the}{\scriptsize \par}

{\scriptsize files~as~no~longer~being~part~of~the~project.~~In~other~words,~future}{\scriptsize \par}

{\scriptsize changes~to~the~named~files~will~not~be~versioned.}{\scriptsize \par}
\end{lyxcode}
\caption{rm命令}


\end{figure}


你可以使用通配符删除一组文件，因此如果我有一组文件如com\_tr.c, com\_rx.c 和 com\_mgmt.c ，我可以使用如下命令删除它们：
\begin{lyxcode}
fossil~rm~com\_{*}.c
\end{lyxcode}
通过运行“fossil status”命令你可以看到在下一次提交时将会被删除的文件。


\subsection{rename\index{rename} or mv\index{mv}}

这个命令用来将仓库里的一个文件重命名。这个命令不会讲磁盘上的文件重命名，所以一般用来在你已经将磁盘上的文件重命名，然后你想要在仓库里对其重命名时。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~help~rename}{\scriptsize \par}

{\scriptsize Usage:~fossil~mv|rename~OLDNAME~NEWNAME}{\scriptsize \par}

{\scriptsize{}~~~or:~fossil~mv|rename~OLDNAME...~DIR}{\scriptsize \par}

{\scriptsize Move~or~rename~one~or~more~files~within~the~tree}{\scriptsize \par}

{\scriptsize This~command~does~not~rename~the~files~on~disk.~~All~this~command~does~is}{\scriptsize \par}

{\scriptsize record~the~fact~that~filenames~have~changed~so~that~appropriate~notations}{\scriptsize \par}

{\scriptsize can~be~made~at~the~next~commit/checkin.}{\scriptsize \par}
\end{lyxcode}
\caption{rename命令}
\end{figure}


和add和rm命令一样你可以在名称里通配符来对一组文件进行重命名，同样的使用“fossil status”命令可以查看当前的状态。


\subsection{status\index{status}}

命令status用来显示与仓库相关文件的状态。它将为你显示所有文件的增加、删除、修改的状态。这里有一个条件就是只会显示已经在仓库里的文件的状态或者说是已经在fossil控制下的文件。它还会显示你检出的版本在时间线的位置以及你仓库保存的位置。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~status}{\scriptsize \par}

{\scriptsize repository:~~~/Users/jschimpf/Public/FOSSIL/FossilBook.fossil}{\scriptsize \par}

{\scriptsize local-root:~~~/Users/jschimpf/Public/FossilBook/}{\scriptsize \par}

{\scriptsize server-code:~~3e67da6d6212494456c69b1c5406a277d7e50430}{\scriptsize \par}

{\scriptsize checkout:~~~~~edd5b5fa4277604f365ec09238422c0aa7a28faf~2010-05-08~14:44:21~UTC}{\scriptsize \par}

{\scriptsize parent:~~~~~~~3f019cbc730db0eb35f20941533a22635856b2b3~2010-05-08~11:15:19~UTC}{\scriptsize \par}

{\scriptsize tags:~~~~~~~~~trunk}{\scriptsize \par}

{\scriptsize EDITED~~~~~fossilbook.lyx}{\scriptsize \par}

{\scriptsize EDITED~~~~~outline.txt}{\scriptsize \par}
\end{lyxcode}
\caption{\label{fig:status-run}status命令}


\end{figure}


上述的清单显示了我克隆的仓库代码副本的保存位置，我的工作位置，Tags标签显示我检出的是主分支trunk。最后显示文件的状态：我正在其中二个文件中进行工作。


\subsection{changes\index{changes}}

这个命令列出所有修改的文件，和status命令类似，但是不会显示satus会显示的其它信息。

\begin{figure}
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~changes}{\scriptsize \par}

{\scriptsize Usage:~fossil~changes}{\scriptsize \par}

{\scriptsize Report~on~the~edit~status~of~all~files~in~the~current~checkout.}{\scriptsize \par}

{\scriptsize See~also~the~\textquotedbl{}status\textquotedbl{}~and~\textquotedbl{}extra\textquotedbl{}~commands.}{\scriptsize \par}
\end{lyxcode}
\caption{changes命令}


\end{figure}



\subsection{extra\index{extra}}

命令extra用来查看你在你工作目录已经增加而没有在Fossil的控制之下的文件。这个很重要，因为如果你移动了你的工作目录或者其它人使用这个仓库时他们将无法获得这些文件。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~extra}{\scriptsize \par}

{\scriptsize Usage:~fossil~extras~?-{}-dotfiles?~?-{}-ignore~GLOBPATTERN?}{\scriptsize \par}

{\scriptsize Print~a~list~of~all~files~in~the~source~tree~that~are~not~part~of}{\scriptsize \par}

{\scriptsize the~current~checkout.~~See~also~the~\textquotedbl{}clean\textquotedbl{}~command.}{\scriptsize \par}

{\scriptsize Files~and~subdirectories~whose~names~begin~with~\textquotedbl{}.\textquotedbl{}~are~normally}{\scriptsize \par}

{\scriptsize ignored~but~can~be~included~by~adding~the~-{}-dotfiles~option.}{\scriptsize \par}
\end{lyxcode}
\caption{extra命令}


\end{figure}


选项--dotfiles会显示所有以“.”开始却不在Fossil管理之下的文件。当你想要这类文件也加入到你的仓库时这个选项非常重要。最后一个选项是“--ignore”让你忽略那些你不想放入仓库的确定文件。在我的例子里有一个名为fossilbook.lyx\textasciitilde{}的文件，它是\LyX{}的备份文件，我不想放入仓库，因为它是临时文件。那么我可以输入命令：

\begin{lyxcode}
fossil~extra~-{}-ignore~{*}.lyx\textasciitilde{}~
\end{lyxcode}
and only get:
\begin{lyxcode}
{[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~\textbf{fossil~extra~-{}-ignore~{*}.lyx\textasciitilde{}}

Images/Commands/help1.epsf
\end{lyxcode}
instead of:
\begin{lyxcode}
{[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~\textbf{fossil~extra}

Images/Commands/help1.epsf

fossilbook.lyx\textasciitilde{}
\end{lyxcode}

\subsection{revert\index{revert}}

命令revert用来将一个文件回滚到仓库对应的文件。当你编辑错误或者犯其它错误时这个命令非常有用。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~revert}{\scriptsize \par}

{\scriptsize Usage:~fossil~revert~?-r~REVISION?~FILE~...}{\scriptsize \par}

{\scriptsize Revert~to~the~current~repository~version~of~FILE,~or~to}{\scriptsize \par}

{\scriptsize the~version~associated~with~baseline~REVISION~if~the~-r~flag}{\scriptsize \par}

{\scriptsize appears.}{\scriptsize \par}

{\scriptsize If~a~file~is~reverted~accidently,~it~can~be~restored~using}{\scriptsize \par}

{\scriptsize the~\textquotedbl{}fossil~undo\textquotedbl{}~command.}{\scriptsize \par}
\end{lyxcode}
\caption{revert命令}


\end{figure}


如果不添加任何参数将回滚到当前的版本，见图解\vref{fig:status-run}。选项-r允许你从时间线选择一个版本进行回滚。


\subsection{update\index{update}}

命令update用来更新一个文件或所有文件到仓库的最新版本。在多人工作的模式下，你必须在每天开始工作前执行此操作，以保证你拥有所有文件的最新版本。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~update}{\scriptsize \par}

{\scriptsize Usage:~fossil~update~?VERSION?~?FILES...?}{\scriptsize \par}

{\scriptsize Change~the~version~of~the~current~checkout~to~VERSION.~~Any~uncommitted}{\scriptsize \par}

{\scriptsize changes~are~retained~and~applied~to~the~new~checkout.}{\scriptsize \par}



{\scriptsize The~VERSION~argument~can~be~a~specific~version~or~tag~or~branch~name.}{\scriptsize \par}

{\scriptsize If~the~VERSION~argument~is~omitted,~then~the~leaf~of~the~the~subtree}{\scriptsize \par}

{\scriptsize that~begins~at~the~current~version~is~used,~if~there~is~only~a~single}{\scriptsize \par}

{\scriptsize leaf.~~VERSION~can~also~be~\textquotedbl{}current\textquotedbl{}~to~select~the~leaf~of~the~current}{\scriptsize \par}

{\scriptsize version~or~\textquotedbl{}latest\textquotedbl{}~to~select~the~most~recent~check-in.}{\scriptsize \par}



{\scriptsize If~one~or~more~FILES~are~listed~after~the~VERSION~then~only~the}{\scriptsize \par}

{\scriptsize named~files~are~candidates~to~be~updated.~~If~FILES~is~omitted,~all}{\scriptsize \par}

{\scriptsize files~in~the~current~checkout~are~subject~to~be~updated.}{\scriptsize \par}



{\scriptsize The~-n~or~-{}-nochange~option~causes~this~command~to~do~a~\textquotedbl{}dry~run\textquotedbl{}.~~It}{\scriptsize \par}

{\scriptsize prints~out~what~would~have~happened~but~does~not~actually~make~any}{\scriptsize \par}

{\scriptsize changes~to~the~current~checkout~or~the~repository.}{\scriptsize \par}



{\scriptsize The~-v~or~-{}-verbose~option~prints~status~information~about~unchanged}{\scriptsize \par}

{\scriptsize files~in~addition~to~those~file~that~actually~do~change.}{\scriptsize \par}
\end{lyxcode}
\caption{update命令}


\end{figure}


Update命令有很多选项，第一个你可以用来指定更新到某个特定的版本，如果不添加这个选项默认检取最新的版本。第二个参数可以让你对一个文件或者许多文件执行操作。你可以执行如下命令：
\begin{lyxcode}
fossil~update~{*}.c
\end{lyxcode}
它将会更新所有以.c结束的文件。

如果有大量的变更，它还有一个“演练”的模式。如果你增加-n参数，它会显示什么将会修改被做而不会真正地做变更。当你不确定将会发生什么事情的时候做这个尝试非常有用。选项-v（可以与-n一起使用或者单独使用）会打印出每一个文件包括没有任何变动的文件。


\subsection{checkout\index{checkout} or co\index{co}}

这个命令和update类似。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~help~checkout}{\scriptsize \par}

{\scriptsize Usage:~fossil~checkout~VERSION~?-f|-{}-force?~?-{}-keep?}{\scriptsize \par}

{\scriptsize Check~out~a~version~specified~on~the~command-line.~~This~command}{\scriptsize \par}

{\scriptsize will~abort~if~there~are~edited~files~in~the~current~checkout~unless}{\scriptsize \par}

{\scriptsize the~-{}-force~option~appears~on~the~command-line.~~The~-{}-keep~option}{\scriptsize \par}

{\scriptsize leaves~files~on~disk~unchanged,~except~the~manifest~and~manifest.uuid}{\scriptsize \par}

{\scriptsize files.}{\scriptsize \par}

{\scriptsize The~-{}-latest~flag~can~be~used~in~place~of~VERSION~to~checkout~the}{\scriptsize \par}

{\scriptsize latest~version~in~the~repository.}{\scriptsize \par}

{\scriptsize See~also~the~\textquotedbl{}update\textquotedbl{}~command.}{\scriptsize \par}
\end{lyxcode}
\caption{checkout或co命令}


\end{figure}



\subsection{undo\index{undo}}

这个命令用来撤销上一个命令如update, merge, 或revert操作。 

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~undo}{\scriptsize \par}

{\scriptsize Usage:~fossil~undo~?FILENAME...?}{\scriptsize \par}



{\scriptsize Undo~the~most~recent~update~or~merge~or~revert~operation.~~If~FILENAME~is}{\scriptsize \par}

{\scriptsize specified~then~restore~the~content~of~the~named~file(s)~but~otherwise}{\scriptsize \par}

{\scriptsize leave~the~update~or~merge~or~revert~in~effect.}{\scriptsize \par}



{\scriptsize A~single~level~of~undo/redo~is~supported.~~The~undo/redo~stack}{\scriptsize \par}

{\scriptsize is~cleared~by~the~commit~and~checkout~commands.}{\scriptsize \par}
\end{lyxcode}
\caption{undo命令}


\end{figure}


它可以指定单独一个文件或者指定的一组文件，否则如果不指定文件，它会对从上一次修改撤销所有文件的修改。


\subsection{diff\index{diff}}

命令diff会产生一个显示当前文件与仓库文件所有不同的文字清单。如果你不指定文件，它会显示所有当前目录下文件与仓库对应文件的不同之处（会略过未修改的文件）。如果使用--form和--to选项，你可以指定二个仓库里的不同版本进行对比。如果不加--to参数意味着与当前工作目录作对比。

如果你定义了第三方的diff程序它会自动使用，除非你使用-i参数使用Fossil内建的diff功能。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~diff}{\scriptsize \par}

{\scriptsize Usage:~fossil~diff|gdiff~?options?~?FILE?}{\scriptsize \par}



{\scriptsize Show~the~difference~between~the~current~version~of~FILE~(as~it}{\scriptsize \par}

{\scriptsize exists~on~disk)~and~that~same~file~as~it~was~checked~out.~~Or}{\scriptsize \par}

{\scriptsize if~the~FILE~argument~is~omitted,~show~the~unsaved~changed~currently}{\scriptsize \par}

{\scriptsize in~the~working~check-out.}{\scriptsize \par}



{\scriptsize If~the~\textquotedbl{}-{}-from~VERSION\textquotedbl{}~or~\textquotedbl{}-r~VERSION\textquotedbl{}~option~is~used~it~specifies}{\scriptsize \par}

{\scriptsize the~source~check-in~for~the~diff~operation.~~If~not~specified,~the~}{\scriptsize \par}

{\scriptsize source~check-in~is~the~base~check-in~for~the~current~check-out.}{\scriptsize \par}

{\scriptsize If~the~\textquotedbl{}-{}-to~VERSION\textquotedbl{}~option~appears,~it~specifies~the~check-in~from}{\scriptsize \par}

{\scriptsize which~the~second~version~of~the~file~or~files~is~taken.~~If~there~is}{\scriptsize \par}

{\scriptsize no~\textquotedbl{}-{}-to\textquotedbl{}~option~then~the~(possibly~edited)~files~in~the~current~check-out}{\scriptsize \par}

{\scriptsize are~used.}{\scriptsize \par}



{\scriptsize The~\textquotedbl{}-i\textquotedbl{}~command-line~option~forces~the~use~of~the~internal~diff~logic}{\scriptsize \par}

{\scriptsize rather~than~any~external~diff~program~that~might~be~configured~using}{\scriptsize \par}

{\scriptsize the~\textquotedbl{}setting\textquotedbl{}~command.~~If~no~external~diff~program~is~configured,~then}{\scriptsize \par}

{\scriptsize the~\textquotedbl{}-i\textquotedbl{}~option~is~a~no-op.~~The~\textquotedbl{}-i\textquotedbl{}~option~converts~\textquotedbl{}gdiff\textquotedbl{}~into~\textquotedbl{}diff\textquotedbl{}.}{\scriptsize \par}
\end{lyxcode}
\caption{diff命令}


\end{figure}



\subsection{gdiff\index{gdiff}}

这个命令和diff命令一样，但是（前提是你定义了gdiff的程序）在你的操作系统里会显示在一个图形界面里。查看UI界面里的设置选项，阅读如何设置图形diff程序。

\begin{figure}
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~gdiff}{\scriptsize \par}

{\scriptsize Usage:~fossil~diff|gdiff~?options?~?FILE?}{\scriptsize \par}

{\scriptsize Show~the~difference~between~the~current~version~of~FILE~(as~it}{\scriptsize \par}

{\scriptsize exists~on~disk)~and~that~same~file~as~it~was~checked~out.~~Or}{\scriptsize \par}

{\scriptsize if~the~FILE~argument~is~omitted,~show~the~unsaved~changed~currently}{\scriptsize \par}

{\scriptsize in~the~working~check-out.}{\scriptsize \par}

{\scriptsize If~the~\textquotedbl{}-{}-from~VERSION\textquotedbl{}~or~\textquotedbl{}-r~VERSION\textquotedbl{}~option~is~used~it~specifies}{\scriptsize \par}

{\scriptsize the~source~check-in~for~the~diff~operation.~~If~not~specified,~the~}{\scriptsize \par}

{\scriptsize source~check-in~is~the~base~check-in~for~the~current~check-out.}{\scriptsize \par}

{\scriptsize If~the~\textquotedbl{}-{}-to~VERSION\textquotedbl{}~option~appears,~it~specifies~the~check-in~from}{\scriptsize \par}

{\scriptsize which~the~second~version~of~the~file~or~files~is~taken.~~If~there~is}{\scriptsize \par}

{\scriptsize no~\textquotedbl{}-{}-to\textquotedbl{}~option~then~the~(possibly~edited)~files~in~the~current~check-out}{\scriptsize \par}

{\scriptsize are~used.}{\scriptsize \par}

{\scriptsize The~\textquotedbl{}-i\textquotedbl{}~command-line~option~forces~the~use~of~the~internal~diff~logic}{\scriptsize \par}

{\scriptsize rather~than~any~external~diff~program~that~might~be~configured~using}{\scriptsize \par}

{\scriptsize the~\textquotedbl{}setting\textquotedbl{}~command.~~If~no~external~diff~program~is~configured,~then}{\scriptsize \par}

{\scriptsize the~\textquotedbl{}-i\textquotedbl{}~option~is~a~no-op.~~The~\textquotedbl{}-i\textquotedbl{}~option~converts~\textquotedbl{}gdiff\textquotedbl{}~into~\textquotedbl{}diff\textquotedbl{}.}{\scriptsize \par}
\end{lyxcode}
\caption{gdiff命令}


\end{figure}



\subsection{ui\index{ui} }

命令ui会启动一个本地的网站服务器。选项--port可以指定一个端口，默认使用的是8080。它会自动启动你操作系统的默认浏览器并自动跳转到你仓库的网站页面。如果你在工作目录里运行这个命令它会为自动打开当前目录下的仓库的页面。如果在其它文件夹你可以在命令行指定一个仓库。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~help~ui}{\scriptsize \par}

{\scriptsize Usage:~fossil~server~?-P|-{}-port~TCPPORT?~?REPOSITORY?}{\scriptsize \par}

{\scriptsize{}~~~Or:~fossil~ui~?-P|-{}-port~TCPPORT?~?REPOSITORY?}{\scriptsize \par}



{\scriptsize Open~a~socket~and~begin~listening~and~responding~to~HTTP~requests~on}{\scriptsize \par}

{\scriptsize TCP~port~8080,~or~on~any~other~TCP~port~defined~by~the~-P~or}{\scriptsize \par}

{\scriptsize -{}-port~option.~~The~optional~argument~is~the~name~of~the~repository.}{\scriptsize \par}

{\scriptsize The~repository~argument~may~be~omitted~if~the~working~directory~is}{\scriptsize \par}

{\scriptsize within~an~open~checkout.}{\scriptsize \par}



{\scriptsize The~\textquotedbl{}ui\textquotedbl{}~command~automatically~starts~a~web~browser~after~initializing}{\scriptsize \par}

{\scriptsize the~web~server.}{\scriptsize \par}



{\scriptsize In~the~\textquotedbl{}server\textquotedbl{}~command,~the~REPOSITORY~can~be~a~directory~(aka~folder)}{\scriptsize \par}

{\scriptsize that~contains~one~or~more~repositories~with~names~ending~in~\textquotedbl{}.fossil\textquotedbl{}.}{\scriptsize \par}

{\scriptsize In~that~case,~the~first~element~of~the~URL~is~used~to~select~among~the}{\scriptsize \par}

{\scriptsize various~repositories.}{\scriptsize \par}
\end{lyxcode}
\caption{ui命令}
\end{figure}



\subsection{server\index{server}}

这个是一个比ui强大的命令。它允许你只运行一个Fossil网站服务器却可以同时托管多个仓库。这样不同于指定特定的仓库，你需要指定一个目录，这个目录里有大量的仓库（全部都是以后缀名fossil结束），这样你就可以使用其中的任何一个仓库了。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~server}{\scriptsize \par}

{\scriptsize Usage:~fossil~server~?-P|-{}-port~TCPPORT?~?REPOSITORY?}{\scriptsize \par}

{\scriptsize{}~~~Or:~fossil~ui~?-P|-{}-port~TCPPORT?~?REPOSITORY?}{\scriptsize \par}

{\scriptsize Open~a~socket~and~begin~listening~and~responding~to~HTTP~requests~on}{\scriptsize \par}

{\scriptsize TCP~port~8080,~or~on~any~other~TCP~port~defined~by~the~-P~or}{\scriptsize \par}

{\scriptsize -{}-port~option.~~The~optional~argument~is~the~name~of~the~repository.}{\scriptsize \par}

{\scriptsize The~repository~argument~may~be~omitted~if~the~working~directory~is}{\scriptsize \par}

{\scriptsize within~an~open~checkout.}{\scriptsize \par}

{\scriptsize The~\textquotedbl{}ui\textquotedbl{}~command~automatically~starts~a~web~browser~after~initializing}{\scriptsize \par}

{\scriptsize the~web~server.}{\scriptsize \par}

{\scriptsize In~the~\textquotedbl{}server\textquotedbl{}~command,~the~REPOSITORY~can~be~a~directory~(aka~folder)}{\scriptsize \par}

{\scriptsize that~contains~one~or~more~repositories~with~names~ending~in~\textquotedbl{}.fossil\textquotedbl{}.}{\scriptsize \par}

{\scriptsize In~that~case,~the~first~element~of~the~URL~is~used~to~select~among~the}{\scriptsize \par}

{\scriptsize various~repositories.}{\scriptsize \par}
\end{lyxcode}
\caption{server命令\label{fig:server-detail}}


\end{figure}



\subsection{commit\index{commit} or ci\index{ci}}

这个命令用来将你工作目录里的文件的修改内容提交到仓库里，且会为提交创建一个新版本并更新时间线。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~help~commit}{\scriptsize \par}

{\scriptsize Usage:~fossil~commit~?OPTIONS?~?FILE...?}{\scriptsize \par}



{\scriptsize Create~a~new~version~containing~all~of~the~changes~in~the~current}{\scriptsize \par}

{\scriptsize checkout.~~You~will~be~prompted~to~enter~a~check-in~comment~unless}{\scriptsize \par}

{\scriptsize one~of~the~\textquotedbl{}-m\textquotedbl{}~or~\textquotedbl{}-M\textquotedbl{}~options~are~used~to~specify~a~comment.}{\scriptsize \par}

{\scriptsize \textquotedbl{}-m\textquotedbl{}~takes~a~single~string~for~the~commit~message~and~\textquotedbl{}-M\textquotedbl{}~requires}{\scriptsize \par}

{\scriptsize a~filename~from~which~to~read~the~commit~message.~If~neither~\textquotedbl{}-m\textquotedbl{}}{\scriptsize \par}

{\scriptsize nor~\textquotedbl{}-M\textquotedbl{}~are~specified~then~the~editor~defined~in~the~\textquotedbl{}editor\textquotedbl{}}{\scriptsize \par}

{\scriptsize fossil~option~(see~fossil~help~set)~will~be~used,~or~from~the}{\scriptsize \par}

{\scriptsize \textquotedbl{}VISUAL\textquotedbl{}~or~\textquotedbl{}EDITOR\textquotedbl{}~environment~variables~(in~that~order)~if~no}{\scriptsize \par}

{\scriptsize editor~is~set.}{\scriptsize \par}



{\scriptsize You~will~be~prompted~for~your~GPG~pass~phrase~in~order~to~sign~the}{\scriptsize \par}

{\scriptsize new~manifest~unless~the~\textquotedbl{}-{}-nosign\textquotedbl{}~options~is~used.~~All~files~that}{\scriptsize \par}

{\scriptsize have~changed~will~be~committed~unless~some~subset~of~files~is}{\scriptsize \par}

{\scriptsize specified~on~the~command~line.}{\scriptsize \par}



{\scriptsize The~-{}-branch~option~followed~by~a~branch~name~cases~the~new~check-in}{\scriptsize \par}

{\scriptsize to~be~placed~in~the~named~branch.~~The~-{}-bgcolor~option~can~be~followed}{\scriptsize \par}

{\scriptsize by~a~color~name~(ex:~~'\#ffc0c0')~to~specify~the~background~color~of}{\scriptsize \par}

{\scriptsize entries~in~the~new~branch~when~shown~in~the~web~timeline~interface.}{\scriptsize \par}

{\scriptsize A~check-in~is~not~permitted~to~fork~unless~the~-{}-force~or~-f}{\scriptsize \par}

{\scriptsize option~appears.~~A~check-in~is~not~allowed~against~a~closed~check-in.}{\scriptsize \par}

{\scriptsize The~-{}-private~option~creates~a~private~check-in~that~is~never~synced.}{\scriptsize \par}

{\scriptsize Children~of~private~check-ins~are~automatically~private.}{\scriptsize \par}



{\scriptsize Options:}{\scriptsize \par}

{\scriptsize{}~~~-{}-comment|-m~COMMENT-TEXT}{\scriptsize \par}

{\scriptsize{}~~~-{}-branch~NEW-BRANCH-NAME}{\scriptsize \par}

{\scriptsize{}~~~-{}-bgcolor~COLOR}{\scriptsize \par}

{\scriptsize{}~~~-{}-nosign}{\scriptsize \par}

{\scriptsize{}~~~-{}-force|-f}{\scriptsize \par}

{\scriptsize{}~~~-{}-private}{\scriptsize \par}

{\scriptsize{}~~~-{}-message-file|-M~COMMENT-FILE}{\scriptsize \par}

{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}{\scriptsize \par}
\end{lyxcode}
\caption{commit命令}


\end{figure}


每次提交都添加一个有意义的备注信息（使用-comment或-m参数）是一个非常好主意。这样你就可以在时间线里读到相关的文字内容。


\section{维护命令}

这些命令相对使用不是很频繁，因为在一般的操作里这些操作很少会用到。你在使用前查看本文档或者使用\textbf{fossil help}命令查看具体描述很有必要。一些命令如new和clone只在你开始一个仓库时会用到。其它如rebuild或者reconstruct只是用来修改或者升级仓库。


\subsection{new\index{new}}

这个命令用来创建一个新的仓库 

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~new}{\scriptsize \par}

{\scriptsize Usage:~fossil~new~?OPTIONS?~FILENAME}{\scriptsize \par}



{\scriptsize Create~a~repository~for~a~new~project~in~the~file~named~FILENAME.}{\scriptsize \par}

{\scriptsize This~command~is~distinct~from~\textquotedbl{}clone\textquotedbl{}.~~The~\textquotedbl{}clone\textquotedbl{}~command~makes}{\scriptsize \par}

{\scriptsize a~copy~of~an~existing~project.~~This~command~starts~a~new~project.}{\scriptsize \par}

{\scriptsize By~default,~your~current~login~name~is~used~to~create~the~default}{\scriptsize \par}

{\scriptsize admin~user.~This~can~be~overridden~using~the~-A|-{}-admin-user}{\scriptsize \par}

{\scriptsize parameter.}{\scriptsize \par}



{\scriptsize Options:}{\scriptsize \par}

{\scriptsize{}~~~-{}-admin-user|-A~USERNAME}{\scriptsize \par}

{\scriptsize{}~~~-{}-date-override~DATETIME}{\scriptsize \par}
\end{lyxcode}
\caption{new命令}


\end{figure}


文件名可以用来指定仓库的名称。选项允许你指定管理人员的名称以及开始日期，如当你想要使用指定的而不是当前的登陆用户、想要使用与现在不同的时间的时候。


\subsection{clone\index{clone}}

克隆命令用来从主仓库创建一个你自己的本地版本。如果你在使用基于网络访问支持多用户的源仓库时(见章节\vref{sub:Server-Setup})，那么这个命令将会将托管的主仓库复制到你的本地机器。同时它将会在你的副本和主仓库直接建立连接，所以对你对本地仓库的修改会传递到主仓库。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~help~clone}{\scriptsize \par}

{\scriptsize Usage:~fossil~clone~?OPTIONS?~URL~FILENAME}{\scriptsize \par}



{\scriptsize Make~a~clone~of~a~repository~specified~by~URL~in~the~local}{\scriptsize \par}

{\scriptsize file~named~FILENAME.~}{\scriptsize \par}



{\scriptsize By~default,~your~current~login~name~is~used~to~create~the~default}{\scriptsize \par}

{\scriptsize admin~user.~This~can~be~overridden~using~the~-A|-{}-admin-user}{\scriptsize \par}

{\scriptsize parameter.}{\scriptsize \par}

{\scriptsize Options:}{\scriptsize \par}



{\scriptsize{}~~~-{}-admin-user|-A~USERNAME}{\scriptsize \par}
\end{lyxcode}
\caption{clone命令}


\end{figure}


和create一样你可以为这个clone的仓库指定一个管理员。主仓库的URL地址可以使用如下格式：
\begin{lyxcode}
http://<user>:<password>@domain
\end{lyxcode}
参数\textbf{user}和\textbf{password}是你指定仓库中的一个有效用户及其密码。在clone之前最好使用浏览器查看一下你的账户和密码。保证你可以访问这个仓库，例如这本书的仓库地址如下：
\begin{lyxcode}
http://pandora.dyn-o-saur.com:8080/cgi-bin/Book.cgi
\end{lyxcode}
将其输入浏览器的地址栏应该可以访问到这本书的主页(见图示\vref{fig:Web-access-to})。在你已经验证成功后，clone操作应该可以正常工作了。

不要忘记（如我一直做的那样）输入本地仓库的名称（见上述FILENAME）。


\subsection{open\index{open}}

打开命令用来将仓库里的文件复制到工作目录里。这样以后你可以创建或者修改产品了。命令还将仓库与工作目录关联起来，这样提交会自动将提交到仓库。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~open}{\scriptsize \par}

{\scriptsize Usage:~fossil~open~FILENAME~?VERSION?~?-{}-keep?}{\scriptsize \par}



{\scriptsize Open~a~connection~to~the~local~repository~in~FILENAME.~~A~checkout}{\scriptsize \par}

{\scriptsize for~the~repository~is~created~with~its~root~at~the~working~directory.}{\scriptsize \par}

{\scriptsize If~VERSION~is~specified~then~that~version~is~checked~out.~~Otherwise}{\scriptsize \par}

{\scriptsize the~latest~version~is~checked~out.~~No~files~other~than~\textquotedbl{}manifest\textquotedbl{}}{\scriptsize \par}

{\scriptsize and~\textquotedbl{}manifest.uuid\textquotedbl{}~are~modified~if~the~-{}-keep~option~is~present.}{\scriptsize \par}



{\scriptsize See~also~the~\textquotedbl{}close\textquotedbl{}~command.}{\scriptsize \par}
\end{lyxcode}
\caption{open命令}


\end{figure}


如果在多用户模式或者你的仓库有多个分支的情况下，指定一个特定的版本非常明智。当你这样运行命令以后Fossil会自动在你工作区域创建所有的文件和目录。额外的文件\_FOSSIL\_，manifiest，manifest.uuid也会自动被创建出来。


\subsection{close\index{close}}

这个命令和open刚好相反，这个命令会中断当前工作目录和Fossil仓库之间的连接。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~close}{\scriptsize \par}

{\scriptsize Usage:~fossil~close~?-f|-{}-force?}{\scriptsize \par}



{\scriptsize The~opposite~of~\textquotedbl{}open\textquotedbl{}.~~Close~the~current~database~connection.}{\scriptsize \par}

{\scriptsize Require~a~-f~or~-{}-force~flag~if~there~are~unsaved~changed~in~the}{\scriptsize \par}

{\scriptsize current~check-out.}{\scriptsize \par}
\end{lyxcode}
\caption{close命令}


\end{figure}


当你需要放弃当前工作目录是，这个命令非常有用。如果工作目录与仓库之间有变动Fossil不会让你执行这个操作。使用--force参数可以强制切断他们之间的连接而不管是否有变更存在。


\subsection{version\index{version}}

这个命令用来显示当前Fossil的版本

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~version}{\scriptsize \par}

{\scriptsize Usage:~fossil~version}{\scriptsize \par}

{\scriptsize Print~the~source~code~version~number~for~the~fossil~executable.}{\scriptsize \par}



{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~version}{\scriptsize \par}

{\scriptsize This~is~fossil~version~{[}c56af61e5e{]}~2010-04-22~15:48:25~UTC}{\scriptsize \par}

{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}{\scriptsize \par}
\end{lyxcode}
\caption{version命令}


\end{figure}


上述图示展示了如何还有帮助命令及使用了上述命令。当你对Fossil有疑问时，获取你使用的fossil版本是非常重要的。然后你可以使用你获得的版本号在Fossil的新闻组查找你使用版本的相关问题，这样他们就可以很快回复你如何修复这个问题或者是一个新的问题。


\subsection{rebuild\index{rebuild}}

如果你将你的Fossil的版本更新了，你需要为你所有的仓库运行此命令。这个命令将会自动将你的仓库更新到你所使用的新版本Fossul。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~rebuild}{\scriptsize \par}

{\scriptsize Usage:~fossil~rebuild~?REPOSITORY?}{\scriptsize \par}

{\scriptsize Reconstruct~the~named~repository~database~from~the~core}{\scriptsize \par}

{\scriptsize records.~~Run~this~command~after~updating~the~fossil}{\scriptsize \par}

{\scriptsize executable~in~a~way~that~changes~the~database~schema.}{\scriptsize \par}
\end{lyxcode}
\caption{rebuild命令}


\end{figure}



\subsection{all\index{all}}

这个事实上是一个修改器，在确定的命令之前使用将会对所有的仓库执行指定的命令。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~all}{\scriptsize \par}

{\scriptsize Usage:~fossil~all~(list|ls|pull|push|rebuild|sync)}{\scriptsize \par}

{\scriptsize The~\textasciitilde{}/.fossil~file~records~the~location~of~all~repositories~for~a}{\scriptsize \par}

{\scriptsize user.~~This~command~performs~certain~operations~on~all~repositories}{\scriptsize \par}

{\scriptsize that~can~be~useful~before~or~after~a~period~of~disconnection~operation.}{\scriptsize \par}

{\scriptsize Available~operations~are:}{\scriptsize \par}

{\scriptsize{}~~~list~~~~~~~Display~the~location~of~all~repositories}{\scriptsize \par}

{\scriptsize{}~~~ls~~~~~~~~~An~alias~for~\textquotedbl{}list\textquotedbl{}}{\scriptsize \par}

{\scriptsize{}~~~pull~~~~~~~Run~a~\textquotedbl{}pull\textquotedbl{}~operation~on~all~repositories}{\scriptsize \par}

{\scriptsize{}~~~push~~~~~~~Run~a~\textquotedbl{}push\textquotedbl{}~on~all~repositories}{\scriptsize \par}

{\scriptsize{}~~~rebuild~~~~Rebuild~on~all~repositories}{\scriptsize \par}

{\scriptsize{}~~~sync~~~~~~~Run~a~\textquotedbl{}sync\textquotedbl{}~on~all~repositories}{\scriptsize \par}

{\scriptsize Repositories~are~automatically~added~to~the~set~of~known~repositories}{\scriptsize \par}

{\scriptsize when~one~of~the~following~commands~against~the~repository:~clone,~info,}{\scriptsize \par}

{\scriptsize pull,~push,~or~sync}{\scriptsize \par}
\end{lyxcode}
\caption{all命令}


\end{figure}



\subsection{push\index{push}}

这个命令会把本地仓库的所有修改推送到主仓库或者远程仓库。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~push}{\scriptsize \par}

{\scriptsize Usage:~fossil~push~?URL?~?options?}{\scriptsize \par}

{\scriptsize Push~changes~in~the~local~repository~over~into~a~remote~repository.}{\scriptsize \par}

{\scriptsize Use~the~\textquotedbl{}-R~REPO\textquotedbl{}~or~\textquotedbl{}-{}-repository~REPO\textquotedbl{}~command-line~options}{\scriptsize \par}

{\scriptsize to~specify~an~alternative~repository~file.}{\scriptsize \par}

{\scriptsize If~the~URL~is~not~specified,~then~the~URL~from~the~most~recent}{\scriptsize \par}

{\scriptsize clone,~push,~pull,~remote-url,~or~sync~command~is~used.}{\scriptsize \par}

{\scriptsize The~URL~specified~normally~becomes~the~new~\textquotedbl{}remote-url\textquotedbl{}~used~for}{\scriptsize \par}

{\scriptsize subsequent~push,~pull,~and~sync~operations.~~However,~the~\textquotedbl{}-{}-once\textquotedbl{}}{\scriptsize \par}

{\scriptsize command-line~option~makes~the~URL~a~one-time-use~URL~that~is~not}{\scriptsize \par}

{\scriptsize saved.}{\scriptsize \par}

{\scriptsize See~also:~clone,~pull,~sync,~remote-url}{\scriptsize \par}
\end{lyxcode}
\caption{push命令}


\end{figure}



\subsection{pull\index{pull}}

这个命令将会从远程仓库把所有的更改拉取到本地仓库。你然后可以使用\textbf{update}命令将所有更改应用到检出的文件。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~pull}{\scriptsize \par}

{\scriptsize Usage:~fossil~pull~?URL?~?options?}{\scriptsize \par}

{\scriptsize Pull~changes~from~a~remote~repository~into~the~local~repository.}{\scriptsize \par}

{\scriptsize Use~the~\textquotedbl{}-R~REPO\textquotedbl{}~or~\textquotedbl{}-{}-repository~REPO\textquotedbl{}~command-line~options}{\scriptsize \par}

{\scriptsize to~specify~an~alternative~repository~file.}{\scriptsize \par}

{\scriptsize If~the~URL~is~not~specified,~then~the~URL~from~the~most~recent}{\scriptsize \par}

{\scriptsize clone,~push,~pull,~remote-url,~or~sync~command~is~used.}{\scriptsize \par}

{\scriptsize The~URL~specified~normally~becomes~the~new~\textquotedbl{}remote-url\textquotedbl{}~used~for}{\scriptsize \par}

{\scriptsize subsequent~push,~pull,~and~sync~operations.~~However,~the~\textquotedbl{}-{}-once\textquotedbl{}}{\scriptsize \par}

{\scriptsize command-line~option~makes~the~URL~a~one-time-use~URL~that~is~not}{\scriptsize \par}

{\scriptsize saved.}{\scriptsize \par}

{\scriptsize See~also:~clone,~push,~sync,~remote-url}{\scriptsize \par}


\end{lyxcode}
\caption{pull命令}


\end{figure}



\subsection{sync\index{sync}}

这个命令用来同步远程副本和源仓库的副本，它同时执行push和pull操作。也可以通过指定远程仓库的URL地址来将本地仓库同步到多个远程仓库。如果你执行update命令时增加-n参数来进行演练，你执行fossil sync，起先不会执行同步操作，直到你使用fossil update -n来执行上述操作。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~sync}{\scriptsize \par}

{\scriptsize Usage:~fossil~sync~?URL?~?options?}{\scriptsize \par}

{\scriptsize Synchronize~the~local~repository~with~a~remote~repository.~~This~is}{\scriptsize \par}

{\scriptsize the~equivalent~of~running~both~\textquotedbl{}push\textquotedbl{}~and~\textquotedbl{}pull\textquotedbl{}~at~the~same~time.}{\scriptsize \par}

{\scriptsize Use~the~\textquotedbl{}-R~REPO\textquotedbl{}~or~\textquotedbl{}-{}-repository~REPO\textquotedbl{}~command-line~options}{\scriptsize \par}

{\scriptsize to~specify~an~alternative~repository~file.}{\scriptsize \par}

{\scriptsize If~a~user-id~and~password~are~required,~specify~them~as~follows:}{\scriptsize \par}

{\scriptsize{}~~~~http://userid:password@www.domain.com:1234/path}{\scriptsize \par}

{\scriptsize If~the~URL~is~not~specified,~then~the~URL~from~the~most~recent~successful}{\scriptsize \par}

{\scriptsize clone,~push,~pull,~remote-url,~or~sync~command~is~used.}{\scriptsize \par}

{\scriptsize The~URL~specified~normally~becomes~the~new~\textquotedbl{}remote-url\textquotedbl{}~used~for}{\scriptsize \par}

{\scriptsize subsequent~push,~pull,~and~sync~operations.~~However,~the~\textquotedbl{}-{}-once\textquotedbl{}}{\scriptsize \par}

{\scriptsize command-line~option~makes~the~URL~a~one-time-use~URL~that~is~not}{\scriptsize \par}

{\scriptsize saved.}{\scriptsize \par}

{\scriptsize See~also:~~clone,~push,~pull,~remote-url}{\scriptsize \par}
\end{lyxcode}
\caption{sync命令}


\end{figure}



\subsection{clean\index{clean}}

这个命令用来删除所有在源码树中的所有“extra”文件。当你要清理源代码或者创建一个干净的结构时这个命令非常有用。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~clean}{\scriptsize \par}

{\scriptsize Usage:~fossil~clean~?-{}-force?~?-{}-dotfiles?}{\scriptsize \par}

{\scriptsize Delete~all~\textquotedbl{}extra\textquotedbl{}~files~in~the~source~tree.~~\textquotedbl{}Extra\textquotedbl{}~files~are}{\scriptsize \par}

{\scriptsize files~that~are~not~officially~part~of~the~checkout.~~See~also}{\scriptsize \par}

{\scriptsize the~\textquotedbl{}extra\textquotedbl{}~command.~This~operation~cannot~be~undone.~}{\scriptsize \par}

{\scriptsize You~will~be~prompted~before~removing~each~file.~If~you~are}{\scriptsize \par}

{\scriptsize sure~you~wish~to~remove~all~\textquotedbl{}extra\textquotedbl{}~files~you~can~specify~the}{\scriptsize \par}

{\scriptsize optional~-{}-force~flag~and~no~prompts~will~be~issued.}{\scriptsize \par}

{\scriptsize Files~and~subdirectories~whose~names~begin~with~\textquotedbl{}.\textquotedbl{}~are}{\scriptsize \par}

{\scriptsize normally~ignored.~~They~are~included~if~the~\textquotedbl{}-{}-dotfiles\textquotedbl{}~option}{\scriptsize \par}

{\scriptsize is~used.}{\scriptsize \par}
\end{lyxcode}
\caption{clean命令}


\end{figure}



\subsection{branch\index{branch}}

当你想要创建或者列出仓库的分支时使用这个命令。之前我们讨论过分叉(见章节\vref{sub:Complications})；和分支是一样的概念，但是在用户的控制之下。这个会出现在当你有版本1.0，但是想在版本2.0里增加新功能，并保持版本1.0分支用于维护时。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~branch}{\scriptsize \par}

{\scriptsize Usage:~fossil~branch~SUBCOMMAND~...~?-R|-{}-repository~FILE?}{\scriptsize \par}

{\scriptsize Run~various~subcommands~on~the~branches~of~the~open~repository~or}{\scriptsize \par}

{\scriptsize of~the~repository~identified~by~the~-R~or~-{}-repository~option.}{\scriptsize \par}

{\scriptsize{}~~~fossil~branch~new~BRANCH-NAME~BASIS~?-bgcolor~COLOR?~}{\scriptsize \par}

{\scriptsize{}~~~~~~~Create~a~new~branch~BRANCH-NAME~off~of~check-in~BASIS.}{\scriptsize \par}

{\scriptsize{}~~~~~~~You~can~optionally~give~the~branch~a~default~color.}{\scriptsize \par}

{\scriptsize{}~~~fossil~branch~list}{\scriptsize \par}

{\scriptsize{}~~~~~~~List~all~branches}{\scriptsize \par}
\end{lyxcode}
\caption{branch命令}


\end{figure}



\subsection{merge\index{merge}}

这个命令和branch相对应，由于将二个分支合并起来。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~merge}{\scriptsize \par}

{\scriptsize Usage:~fossil~merge~{[}-{}-cherrypick{]}~{[}-{}-backout{]}~VERSION}{\scriptsize \par}

{\scriptsize The~argument~is~a~version~that~should~be~merged~into~the~current}{\scriptsize \par}

{\scriptsize checkout.~~All~changes~from~VERSION~back~to~the~nearest~common}{\scriptsize \par}

{\scriptsize ancestor~are~merged.~~Except,~if~either~of~the~-{}-cherrypick~or}{\scriptsize \par}

{\scriptsize -{}-backout~options~are~used~only~the~changes~associated~with~the}{\scriptsize \par}

{\scriptsize single~check-in~VERSION~are~merged.~~The~-{}-backout~option~causes}{\scriptsize \par}

{\scriptsize the~changes~associated~with~VERSION~to~be~removed~from~the~current}{\scriptsize \par}

{\scriptsize checkout~rather~than~added.}{\scriptsize \par}

{\scriptsize Only~file~content~is~merged.~~The~result~continues~to~use~the}{\scriptsize \par}

{\scriptsize file~and~directory~names~from~the~current~checkout~even~if~those}{\scriptsize \par}

{\scriptsize names~might~have~been~changed~in~the~branch~being~merged~in.}{\scriptsize \par}

{\scriptsize Other~options:}{\scriptsize \par}

{\scriptsize{}~~-{}-detail~~~~~~~~~~~~~~~~Show~additional~details~of~the~merge}{\scriptsize \par}

{\scriptsize{}~~-{}-binary~GLOBPATTERN~~~~Treat~files~that~match~GLOBPATTERN~as~binary}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~~~~~~~and~do~not~try~to~merge~parallel~changes.~~This}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~~~~~~~option~overrides~the~\textquotedbl{}binary-glob\textquotedbl{}~setting.}{\scriptsize \par}
\end{lyxcode}
\caption{merge命令}


\end{figure}



\subsection{tag\index{tag}}

这个命令可以用来控制“Tags”，也就是你在时间线上每个等级条目的参数。当然你也可以使用add/delete/controll在UI界面的时间线里来操作tags，选择任何一个条目然后编辑。参见\vref{fig:Remove-Leaf}。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~tag}{\scriptsize \par}

{\scriptsize Usage:~fossil~tag~SUBCOMMAND~...}{\scriptsize \par}

{\scriptsize Run~various~subcommands~to~control~tags~and~properties}{\scriptsize \par}

{\scriptsize{}~~~~fossil~tag~add~?-{}-raw?~?-{}-propagate?~TAGNAME~CHECK-IN~?VALUE?}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Add~a~new~tag~or~property~to~CHECK-IN.~The~tag~will}{\scriptsize \par}

{\scriptsize{}~~~~~~~~be~usable~instead~of~a~CHECK-IN~in~commands~such~as}{\scriptsize \par}

{\scriptsize{}~~~~~~~~update~and~merge.~~If~the~-{}-propagate~flag~is~present,}{\scriptsize \par}

{\scriptsize{}~~~~~~~~the~tag~value~propagates~to~all~descendants~of~CHECK-IN}{\scriptsize \par}

{\scriptsize{}~~~~fossil~tag~cancel~?-{}-raw?~TAGNAME~CHECK-IN}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Remove~the~tag~TAGNAME~from~CHECK-IN,~and~also~remove}{\scriptsize \par}

{\scriptsize{}~~~~~~~~the~propagation~of~the~tag~to~any~descendants.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~tag~find~?-{}-raw?~TAGNAME}{\scriptsize \par}

{\scriptsize{}~~~~~~~~List~all~check-ins~that~use~TAGNAME}{\scriptsize \par}

{\scriptsize{}~~~~fossil~tag~list~?-{}-raw?~?CHECK-IN?}{\scriptsize \par}

{\scriptsize{}~~~~~~~~List~all~tags,~or~if~CHECK-IN~is~supplied,~list}{\scriptsize \par}

{\scriptsize{}~~~~~~~~all~tags~and~their~values~for~CHECK-IN.}{\scriptsize \par}

{\scriptsize The~option~-{}-raw~allows~the~manipulation~of~all~types~of~tags}{\scriptsize \par}

{\scriptsize used~for~various~internal~purposes~in~fossil.~It~also~shows}{\scriptsize \par}

{\scriptsize \textquotedbl{}cancel\textquotedbl{}~tags~for~the~\textquotedbl{}find\textquotedbl{}~and~\textquotedbl{}list\textquotedbl{}~subcommands.~You~should}{\scriptsize \par}

{\scriptsize not~use~this~option~to~make~changes~unless~you~are~sure~what}{\scriptsize \par}

{\scriptsize you~are~doing.}{\scriptsize \par}

{\scriptsize If~you~need~to~use~a~tagname~that~might~be~confused~with}{\scriptsize \par}

{\scriptsize a~hexadecimal~baseline~or~artifact~ID,~you~can~explicitly}{\scriptsize \par}

{\scriptsize disambiguate~it~by~prefixing~it~with~\textquotedbl{}tag:\textquotedbl{}.~For~instance:}{\scriptsize \par}

{\scriptsize{}~~fossil~update~decaf}{\scriptsize \par}

{\scriptsize will~be~taken~as~an~artifact~or~baseline~ID~and~fossil~will}{\scriptsize \par}

{\scriptsize probably~complain~that~no~such~revision~was~found.~However}{\scriptsize \par}

{\scriptsize{}~~fossil~update~tag:decaf}{\scriptsize \par}

{\scriptsize will~assume~that~\textquotedbl{}decaf\textquotedbl{}~is~a~tag/branch~name.}{\scriptsize \par}
\end{lyxcode}
\caption{tag命令}


\end{figure}



\subsection{settings\index{settings}}

这个命令用来设置或者取消设置Fossil的属性参数。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~settings}{\scriptsize \par}

{\scriptsize COMMAND:~settings}{\scriptsize \par}

{\scriptsize COMMAND:~unset}{\scriptsize \par}

{\scriptsize fossil~setting~?PROPERTY?~?VALUE?~?-global?}{\scriptsize \par}

{\scriptsize fossil~unset~PROPERTY~?-global?}{\scriptsize \par}

{\scriptsize The~\textquotedbl{}setting\textquotedbl{}~command~with~no~arguments~lists~all~properties~and~their}{\scriptsize \par}

{\scriptsize values.~~With~just~a~property~name~it~shows~the~value~of~that~property.}{\scriptsize \par}

{\scriptsize With~a~value~argument~it~changes~the~property~for~the~current~repository.}{\scriptsize \par}

{\scriptsize The~\textquotedbl{}unset\textquotedbl{}~command~clears~a~property~setting.}{\scriptsize \par}

{\scriptsize{}~~~auto-captcha~~~~~If~enabled,~the~Login~page~will~provide~a~button}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~which~uses~JavaScript~to~fill~out~the~captcha~for}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~the~\textquotedbl{}anonymous\textquotedbl{}~user.~(Most~bots~cannot~use~JavaScript.)}{\scriptsize \par}

{\scriptsize{}~~~autosync~~~~~~~~~If~enabled,~automatically~pull~prior~to~commit}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~or~update~and~automatically~push~after~commit~or}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~tag~or~branch~creation.~~If~the~the~value~is~\textquotedbl{}pullonly\textquotedbl{}}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~then~only~pull~operations~occur~automatically.}{\scriptsize \par}

{\scriptsize{}~~~binary-glob~~~~~~The~VALUE~is~a~comma-separated~list~of~GLOB~patterns}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~that~should~be~treated~as~binary~files~for~merging}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~purposes.~~Example:~~~{*}.xml}{\scriptsize \par}

{\scriptsize{}~~~clearsign~~~~~~~~When~enabled,~fossil~will~attempt~to~sign~all~commits}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~with~gpg.~~When~disabled~(the~default),~commits~will}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~be~unsigned.}{\scriptsize \par}

{\scriptsize{}~~~diff-command~~~~~External~command~to~run~when~performing~a~diff.}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~If~undefined,~the~internal~text~diff~will~be~used.}{\scriptsize \par}

{\scriptsize{}~~~dont-push~~~~~~~~Prevent~this~repository~from~pushing~from~client~to}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~server.~~Useful~when~setting~up~a~private~branch.}{\scriptsize \par}

{\scriptsize{}~~~editor~~~~~~~~~~~Text~editor~command~used~for~check-in~comments.}{\scriptsize \par}

{\scriptsize{}~~~gdiff-command~~~~External~command~to~run~when~performing~a~graphical}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~diff.~If~undefined,~text~diff~will~be~used.}{\scriptsize \par}

{\scriptsize{}~~~http-port~~~~~~~~The~TCP/IP~port~number~to~use~by~the~\textquotedbl{}server\textquotedbl{}}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~and~\textquotedbl{}ui\textquotedbl{}~commands.~~Default:~8080}{\scriptsize \par}

{\scriptsize{}~~~ignore-glob~~~~~~The~VALUE~is~a~comma-separated~list~of~GLOB~patterns}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~specifying~files~that~the~\textquotedbl{}extra\textquotedbl{}~command~will~ignore.}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~Example:~~{*}.o,{*}.obj,{*}.exe}{\scriptsize \par}

{\scriptsize{}~~~localauth~~~~~~~~If~enabled,~require~that~HTTP~connections~from}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~127.0.0.1~be~authenticated~by~password.~~If}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~false,~all~HTTP~requests~from~localhost~have}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~unrestricted~access~to~the~repository.}{\scriptsize \par}

{\scriptsize{}~~~mtime-changes~~~~Use~file~modification~times~(mtimes)~to~detect~when}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~files~have~been~modified.~~(Default~\textquotedbl{}on\textquotedbl{}.)}{\scriptsize \par}

{\scriptsize{}~~~pgp-command~~~~~~Command~used~to~clear-sign~manifests~at~check-in.}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~The~default~is~\textquotedbl{}gpg~-{}-clearsign~-o~\textquotedbl{}.}{\scriptsize \par}

{\scriptsize{}~~~proxy~~~~~~~~~~~~URL~of~the~HTTP~proxy.~~If~undefined~or~\textquotedbl{}off\textquotedbl{}~then}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~the~\textquotedbl{}http\_proxy\textquotedbl{}~environment~variable~is~consulted.}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~If~the~http\_proxy~environment~variable~is~undefined}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~then~a~direct~HTTP~connection~is~used.}{\scriptsize \par}

{\scriptsize{}~~~web-browser~~~~~~A~shell~command~used~to~launch~your~preferred}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~web~browser~when~given~a~URL~as~an~argument.}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~Defaults~to~\textquotedbl{}start\textquotedbl{}~on~windows,~\textquotedbl{}open\textquotedbl{}~on~Mac,}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~~~~~~~~~~and~\textquotedbl{}firefox\textquotedbl{}~on~Unix.}{\scriptsize \par}
\end{lyxcode}
\caption{settings命令}


\end{figure}



\section{杂项}

这些命令看起来不适合任何分类但是却非常有用。

\subsection{zip\index{zip}}

这个命令所做的和基于用户界面的一样。如图示\vref{fig:Timeline-Detail}你可以下载一个指定版本文件的ZIP压缩文档。这个命令使得你可以从命令行执行该操作。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~zip}{\scriptsize \par}

{\scriptsize Usage:~fossil~zip~VERSION~OUTPUTFILE~{[}-{}-name~DIRECTORYNAME{]}}{\scriptsize \par}

{\scriptsize Generate~a~ZIP~archive~for~a~specified~version.~~If~the~-{}-name~option~is}{\scriptsize \par}

{\scriptsize used,~it~argument~becomes~the~name~of~the~top-level~directory~in~the}{\scriptsize \par}

{\scriptsize resulting~ZIP~archive.~~If~-{}-name~is~omitted,~the~top-level~directory}{\scriptsize \par}

{\scriptsize named~is~derived~from~the~project~name,~the~check-in~date~and~time,~and}{\scriptsize \par}

{\scriptsize the~artifact~ID~of~the~check-in.}{\scriptsize \par}
\end{lyxcode}
\caption{zip命令}


\end{figure}



\subsection{user\index{user}}

这个命令用于修改用户信息。这个命令复制了你在用户界面可以做的一些操作，详细可查看图示\vref{fig:New-Editor-user}。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~user}{\scriptsize \par}

{\scriptsize Usage:~fossil~user~SUBCOMMAND~...~~?-R|-{}-repository~FILE?}{\scriptsize \par}

{\scriptsize Run~various~subcommands~on~users~of~the~open~repository~or~of}{\scriptsize \par}

{\scriptsize the~repository~identified~by~the~-R~or~-{}-repository~option.}{\scriptsize \par}

{\scriptsize{}~~~fossil~user~capabilities~USERNAME~?STRING?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Query~or~set~the~capabilities~for~user~USERNAME}{\scriptsize \par}

{\scriptsize{}~~~fossil~user~default~?USERNAME?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Query~or~set~the~default~user.~~The~default~user~is~the}{\scriptsize \par}

{\scriptsize{}~~~~~~~user~for~command-line~interaction.}{\scriptsize \par}

{\scriptsize{}~~~fossil~user~list}{\scriptsize \par}

{\scriptsize{}~~~~~~~List~all~users~known~to~the~repository}{\scriptsize \par}

{\scriptsize{}~~~fossil~user~new~?USERNAME?~?CONTACT-INFO?~?PASSWORD?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Create~a~new~user~in~the~repository.~~Users~can~never~be}{\scriptsize \par}

{\scriptsize{}~~~~~~~deleted.~~They~can~be~denied~all~access~but~they~must~continue}{\scriptsize \par}

{\scriptsize{}~~~~~~~to~exist~in~the~database.}{\scriptsize \par}

{\scriptsize{}~~~fossil~user~password~USERNAME~?PASSWORD?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Change~the~web~access~password~for~a~user.}{\scriptsize \par}
\end{lyxcode}
\caption{user命令}


\end{figure}



\subsection{finfo\index{finfo}}

这个命令可以输出任意指定文件的历史信息。如果你在其它系统里需要使用这个文件的历史信息时这个命令非常有用。你可以将结果传递到其它可以解析和使用该数据的系统。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~finfo}{\scriptsize \par}

{\scriptsize Usage:~fossil~finfo~FILENAME}{\scriptsize \par}

{\scriptsize Print~the~change~history~for~a~single~file.}{\scriptsize \par}

{\scriptsize The~\textquotedbl{}-{}-limit~N\textquotedbl{}~and~\textquotedbl{}-{}-offset~P\textquotedbl{}~options~limits~the~output~to~the~first}{\scriptsize \par}

{\scriptsize N~changes~after~skipping~P~changes.}{\scriptsize \par}
\end{lyxcode}
\caption{finfo detail}


\end{figure}


一个查勘我们这本书的仓库里的outline.txt文件历史的例子如下：
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~}\textbf{\scriptsize finfo~outline.txt}{\scriptsize \par}

{\scriptsize History~of~outline.txt}{\scriptsize \par}

{\scriptsize 2010-05-17~{[}0272dc0169{]}~Finished~maintenance~commands~(user:~jim,~artifact:}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~{[}25b6e38e97{]})}{\scriptsize \par}

{\scriptsize 2010-05-12~{[}5e5c0f7d55{]}~End~of~day~commit~(user:~jim,~artifact:~{[}d1a1d31fbd{]})}{\scriptsize \par}

{\scriptsize 2010-05-10~{[}e924ca3525{]}~End~of~day~update~(user:~jim,~artifact:~{[}7cd19079a1{]})}{\scriptsize \par}

{\scriptsize 2010-05-09~{[}0abb95b046{]}~Intermediate~commit,~not~done~with~basic~commands}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~(user:~jim,~artifact:~{[}6f7bcd48b9{]})}{\scriptsize \par}

{\scriptsize 2010-05-07~{[}6921e453cd{]}~Update~outline~\&~book~corrections~(user:~jim,}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~artifact:~{[}4eff85c793{]})}{\scriptsize \par}

{\scriptsize 2010-05-03~{[}158492516c{]}~Moved~to~clone~repository~(user:~jim,~artifact:}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~{[}23b729cb66{]})}{\scriptsize \par}

{\scriptsize 2010-05-03~{[}1a403c87fc{]}~Update~before~moving~to~server~(user:~jim,~artifact:}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~{[}706a9d394d{]})}{\scriptsize \par}

{\scriptsize 2010-04-30~{[}fa5b9247bd{]}~Working~on~chapter~1~(user:~jim,~artifact:}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~{[}7bb188f0c6{]})}{\scriptsize \par}

{\scriptsize 2010-04-29~{[}51be6423a3{]}~Update~outline~(user:~jim,~artifact:~{[}7cd39dfa06{]})}{\scriptsize \par}

{\scriptsize 2010-04-27~{[}39bc728527{]}~{[}1665c78d94{]}~Ticket~Use~(user:~jim,~artifact:}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~{[}1f82aaf41c{]})}{\scriptsize \par}

{\scriptsize 2010-04-26~{[}497b93858f{]}~Update~to~catch~changes~in~outline~(user:~jim,}{\scriptsize \par}

{\scriptsize{}~~~~~~~~~~~artifact:~{[}b870231e48{]})}{\scriptsize \par}

{\scriptsize 2010-04-25~{[}8fa0708186{]}~Initial~Commit~(user:~jim,~artifact:~{[}34a460a468{]})}{\scriptsize \par}

{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}{\scriptsize \par}
\end{lyxcode}

\subsection{timeline\index{timeline}}

这个可以多样地输出项目的时间线。如果你在为Fossil创建GUI界面及想要显示时间线时这个命令非常有用。你可以执行这个命令然后获取返回结果并在你的UI上显示。这里列出了很多选项来T控制显示的样式。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~timeline}{\scriptsize \par}

{\scriptsize Usage:~fossil~timeline~?WHEN?~?BASELINE|DATETIME?~?-n~N?~?-t~TYPE?}{\scriptsize \par}

{\scriptsize Print~a~summary~of~activity~going~backwards~in~date~and~time}{\scriptsize \par}

{\scriptsize specified~or~from~the~current~date~and~time~if~no~arguments}{\scriptsize \par}

{\scriptsize are~given.~~Show~as~many~as~N~(default~20)~check-ins.~~The}{\scriptsize \par}

{\scriptsize WHEN~argument~can~be~any~unique~abbreviation~of~one~of~these}{\scriptsize \par}

{\scriptsize keywords:}{\scriptsize \par}

{\scriptsize{}~~~~before}{\scriptsize \par}

{\scriptsize{}~~~~after}{\scriptsize \par}

{\scriptsize{}~~~~descendants~|~children}{\scriptsize \par}

{\scriptsize{}~~~~ancestors~|~parents}{\scriptsize \par}

{\scriptsize The~BASELINE~can~be~any~unique~prefix~of~4~characters~or~more.}{\scriptsize \par}

{\scriptsize The~DATETIME~should~be~in~the~ISO8601~format.~~For}{\scriptsize \par}

{\scriptsize examples:~\textquotedbl{}2007-08-18~07:21:21\textquotedbl{}.~~You~can~also~say~\textquotedbl{}current\textquotedbl{}}{\scriptsize \par}

{\scriptsize for~the~current~version~or~\textquotedbl{}now\textquotedbl{}~for~the~current~time.}{\scriptsize \par}

{\scriptsize The~optional~TYPE~argument~may~any~types~supported~by~the~/timeline}{\scriptsize \par}

{\scriptsize page.~For~example:}{\scriptsize \par}

{\scriptsize{}~~~~w~~=~wiki~commits~only}{\scriptsize \par}

{\scriptsize{}~~~~ci~=~file~commits~only}{\scriptsize \par}

{\scriptsize{}~~~~t~~=~tickets~only}{\scriptsize \par}
\end{lyxcode}
\caption{timeline命令}


\end{figure}



\subsection{wiki\index{wiki}}

这个命令允许你从命令行来控制Wiki。这个在你使用命令行控制Fossil或者想要增加大量的自动生成的页面到Wiki时会非常有用。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~wiki}{\scriptsize \par}

{\scriptsize Usage:~fossil~wiki~(export|create|commit|list)~WikiName}{\scriptsize \par}

{\scriptsize Run~various~subcommands~to~work~with~wiki~entries.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~export~PAGENAME~?FILE?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Sends~the~latest~version~of~the~PAGENAME~wiki}{\scriptsize \par}

{\scriptsize{}~~~~~~~entry~to~the~given~file~or~standard~output.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~commit~PAGENAME~?FILE?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Commit~changes~to~a~wiki~page~from~FILE~or~from~standard}{\scriptsize \par}

{\scriptsize{}~~~~~~~input.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~create~PAGENAME~?FILE?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Create~a~new~wiki~page~with~initial~content~taken~from}{\scriptsize \par}

{\scriptsize{}~~~~~~~FILE~or~from~standard~input.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~list}{\scriptsize \par}

{\scriptsize{}~~~~~~~Lists~all~wiki~entries,~one~per~line,~ordered}{\scriptsize \par}

{\scriptsize{}~~~~~~~case-insentively~by~name.}{\scriptsize \par}

{\scriptsize TODOs:}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~export~?-u~ARTIFACT?~WikiName~?FILE?}{\scriptsize \par}

{\scriptsize{}~~~~~~~Outputs~the~selected~version~of~WikiName.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~delete~?-m~MESSAGE?~WikiName}{\scriptsize \par}

{\scriptsize{}~~~~~~~The~same~as~deleting~a~file~entry,~but~i~don't~know~if~fossil}{\scriptsize \par}

{\scriptsize{}~~~~~~~supports~a~commit~message~for~Wiki~entries.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~?-u?~?-d?~?-s={[}|{]}?~list}{\scriptsize \par}

{\scriptsize{}~~~~~~~Lists~the~artifact~ID~and/or~Date~of~last~change~along~with}{\scriptsize \par}

{\scriptsize{}~~~~~~~each~entry~name,~delimited~by~the~-s~char.}{\scriptsize \par}

{\scriptsize{}~~~~fossil~wiki~diff~?ARTIFACT?~?-f~infile{[}=stdin{]}?~EntryName}{\scriptsize \par}

{\scriptsize{}~~~~~~~Diffs~the~local~copy~of~a~page~with~a~given~version~(defaulting}{\scriptsize \par}

{\scriptsize{}~~~~~~~to~the~head~version).}{\scriptsize \par}
\end{lyxcode}
\caption{wiki命令}


\end{figure}



\section{高级命令}

这些命令你很少会用到。这些命令只有在使用Fossil做非常复杂的事情时才会被用到。如果你不得不使用这些命令，你大概已经超出了本书所讲述的范围。


\subsection{scrub\index{scrub}}

这个命令用来从仓库删除敏感信息如密码。这样就运行你将整个仓库发送给某个人而不必担心你的个人信息。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~scrub}{\scriptsize \par}

{\scriptsize COMMAND:~scrub}{\scriptsize \par}

{\scriptsize fossil~scrub~{[}-{}-verily{]}~{[}-{}-force{]}~{[}REPOSITORY{]}}{\scriptsize \par}

{\scriptsize The~command~removes~sensitive~information~(such~as~passwords)~from~a}{\scriptsize \par}

{\scriptsize repository~so~that~the~repository~can~be~sent~to~an~untrusted~reader.}{\scriptsize \par}

{\scriptsize By~default,~only~passwords~are~removed.~~However,~if~the~-{}-verily~option}{\scriptsize \par}

{\scriptsize is~added,~then~private~branches,~concealed~email~addresses,~IP}{\scriptsize \par}

{\scriptsize addresses~of~correspondents,~and~similar~privacy-sensitive~fields}{\scriptsize \par}

{\scriptsize are~also~purged.}{\scriptsize \par}

{\scriptsize This~command~permanently~deletes~the~scrubbed~information.~~The~effects}{\scriptsize \par}

{\scriptsize of~this~command~are~irreversible.~~Use~with~caution.}{\scriptsize \par}

{\scriptsize The~user~is~prompted~to~confirm~the~scrub~unless~the~-{}-force~option}{\scriptsize \par}

{\scriptsize is~used.}{\scriptsize \par}
\end{lyxcode}
\caption{scrub命令}


\end{figure}



\subsection{search\index{search}}

这个命令为一个样品搜索时间线。这个也可以在界面的时间线页面来操作。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~search}{\scriptsize \par}

{\scriptsize COMMAND:~search}{\scriptsize \par}

{\scriptsize fossil~search~pattern...}{\scriptsize \par}

{\scriptsize Search~for~timeline~entries~matching~the~pattern.}{\scriptsize \par}
\end{lyxcode}
\caption{search命令}


\end{figure}



\subsection{sha1sum\index{sha1sum}}

这个命令可以指定文件计算SHA1的值。这个结果Fossil使用了所有对象的进行计算，可以保证每个任何文件都有一个唯一值。

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~sha1sum}{\scriptsize \par}

{\scriptsize COMMAND:~sha1sum}{\scriptsize \par}

{\scriptsize fossil~sha1sum~FILE...}{\scriptsize \par}

{\scriptsize Compute~an~SHA1~checksum~of~all~files~named~on~the~command-line.}{\scriptsize \par}

{\scriptsize If~an~file~is~named~\textquotedbl{}-\textquotedbl{}~then~take~its~content~from~standard~input.}{\scriptsize \par}
\end{lyxcode}
\caption{sha1sum命令}


\end{figure}



\subsection{rstats\index{rstats}}

为当前检出的仓库打印一份状态报告

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~rstats}{\scriptsize \par}

{\scriptsize Usage:~fossil~rstats}{\scriptsize \par}

{\scriptsize Deliver~a~report~of~the~repository~statistics~for~the}{\scriptsize \par}

{\scriptsize current~checkout.}{\scriptsize \par}
\end{lyxcode}
\caption{rstats命令}


\end{figure}


比如，在Fossil用户向导仓库里运行它：
\begin{lyxcode}
{[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~\textbf{fossil~rstats}

~Number~of~Artifacts:~137

~~59~full~text~+~78~delta~blobs

~278961~bytes~average,~38217738~bytes~total

~~Number~Of~Checkins:~26

~~~~~Number~Of~Files:~37

Number~Of~Wiki~Pages:~2

~~~Number~Of~Tickets:~6

~Duration~Of~Project:~23~days
\end{lyxcode}

\subsection{configuration\index{configuration}}

这个命令运行你保存或者加载Fossil的定制配置

\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~fossil~}\textbf{\scriptsize help~configuration}{\scriptsize \par}

{\scriptsize Usage:~fossil~configure~METHOD~...}{\scriptsize \par}

{\scriptsize Where~METHOD~is~one~of:~export~import~merge~pull~push~reset.~~All~methods}{\scriptsize \par}

{\scriptsize accept~the~-R~or~-{}-repository~option~to~specific~a~repository.}{\scriptsize \par}

{\scriptsize{}~~~fossil~configuration~export~AREA~FILENAME}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Write~to~FILENAME~exported~configuration~information~for~AREA.}{\scriptsize \par}

{\scriptsize{}~~~~~~~~AREA~can~be~one~of:~~all~ticket~skin~project}{\scriptsize \par}

{\scriptsize{}~~~fossil~configuration~import~FILENAME}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Read~a~configuration~from~FILENAME,~overwriting~the~current}{\scriptsize \par}

{\scriptsize{}~~~~~~~~configuration.}{\scriptsize \par}

{\scriptsize{}~~~fossil~configuration~merge~FILENAME}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Read~a~configuration~from~FILENAME~and~merge~its~values~into}{\scriptsize \par}

{\scriptsize{}~~~~~~~~the~current~configuration.~~Existing~values~take~priority~over}{\scriptsize \par}

{\scriptsize{}~~~~~~~~values~read~from~FILENAME.}{\scriptsize \par}

{\scriptsize{}~~~fossil~configuration~pull~AREA~?URL?}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Pull~and~install~the~configuration~from~a~different~server}{\scriptsize \par}

{\scriptsize{}~~~~~~~~identified~by~URL.~~If~no~URL~is~specified,~then~the~default}{\scriptsize \par}

{\scriptsize{}~~~~~~~~server~is~used.~}{\scriptsize \par}

{\scriptsize{}~~~fossil~configuration~push~AREA~?URL?}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Push~the~local~configuration~into~the~remote~server~identified}{\scriptsize \par}

{\scriptsize{}~~~~~~~~by~URL.~~Admin~privilege~is~required~on~the~remote~server~for}{\scriptsize \par}

{\scriptsize{}~~~~~~~~this~to~work.}{\scriptsize \par}

{\scriptsize{}~~~fossil~configuration~reset~AREA}{\scriptsize \par}

{\scriptsize{}~~~~~~~~Restore~the~configuration~to~the~default.~~AREA~as~above.}{\scriptsize \par}

{\scriptsize WARNING:~Do~not~import,~merge,~or~pull~configurations~from~an~untrusted}{\scriptsize \par}

{\scriptsize source.~~The~inbound~configuration~is~not~checked~for~safety~and~can}{\scriptsize \par}

{\scriptsize introduce~security~vulnerabilities.}{\scriptsize \par}
\end{lyxcode}
\caption{configuration命令}


\end{figure}



\subsection{descendants\index{descendants}}

使用这个命令来查看文件在时间线的什么位置。
\begin{figure}[H]
\begin{lyxcode}
{\scriptsize {[}Pandora-2:jschimpf/Public/FossilBook{]}~jim\%~}\textbf{\scriptsize fossil~help~descendants}{\scriptsize \par}

{\scriptsize Usage:~fossil~descendants~?BASELINE-ID?}{\scriptsize \par}

{\scriptsize Find~all~leaf~descendants~of~the~baseline~specified~or~if~the~argument}{\scriptsize \par}

{\scriptsize is~omitted,~of~the~baseline~currently~checked~out.}{\scriptsize \par}


\end{lyxcode}
\caption{descendants命令}


\end{figure}

